package domain;

import base.Person;

public class Teacher extends Person {
    private Course course;

    public Teacher(String id, String name, String gender) {
        super(id, name, gender); // 调用父类构造方法
    }

    public void setCourse(Course course) {
        this.course = course;
    }

    public Course getCourse() {
        return course;
    }

    // 教师特有的打印授课信息方法
    public void printTeachingInfo() {
        if (course != null) {
            System.out.println(name + " 授课信息：");
            System.out.println("课程名称: " + course.getCourseName());
            System.out.println("上课地点: " + course.getLocation());
            System.out.println("上课时间: " + course.getTime());
        } else {
            System.out.println(name + " 暂无授课安排");
        }
    }
}